/*
 * @Description: 公用属性
 */
import { getQueryString } from '@/plugins/methods';
const templateId = getQueryString('templateId');
const projectId = getQueryString('projectId');
const summaryId = getQueryString('summaryId');
const affairId = getQueryString('affairId');
const openFrom = getQueryString('openFrom');
const method = getQueryString('method');
const from = getQueryString('from') || openFrom;
const baseObjectId = getQueryString('baseObjectId');
const baseApp = getQueryString('baseApp');
const bodyType = getQueryString('bodyType');
const theme = getQueryString('theme') || 'simple';
const cashId = getQueryString('cashId') || '';
const processId = getQueryString('processId') || '';
const contentAnchor = getQueryString('contentAnchor') || '';
const referType = getQueryString('referType') || '';
const referId = getQueryString('referId') || '';
const designId = getQueryString('designId') || '';
const docId = getQueryString('docId') || '';
const relativeProcessId = getQueryString('relativeProcessId') || '';

//处理页面去除掉class
if (method === 'summary') {
  document.body.classList.remove('is-create');
}

//艾特所有人
export const AT_ALL = [{ memberName: 'All', memberId: 'All', affairId }];

export const BodyTypeEnums={
  html:10,//正文
  form:20,//表单正文
  officeWord:41,//微软word
  officeExcel:42,//微软excel
  wpsWord:43,//金山wps word
  wpsExcel:44,//金山wps exel
  pdf:45,
  ofd:46,
  third:90,
};

export default {
  //工程目录
  ctxPath: window._ctxPath,
  templateId,
  from,
  projectId,
  summaryId,
  affairId,
  openFrom,
  baseObjectId,
  baseApp,
  method,
  contentAnchor,
  referType,//致信消息监听
  referId,//消息接收对象
  //主题模版
  theme,
  bodyType,
  //是否是处理页面
  isSummary: method === 'summary',
  //是否展示意见区（包括转发意见）fix:存在事项id就说明有意见需要显示出来
  isShowOpinion: affairId && true,
  //是否是cap4
  isCap4: bodyType === '20',
  //是否是标准正文协同
  isStandard: bodyType !== '20',
  cashId,//致信穿透机制
  processId,//主子流程穿透机制
  designId,//报表查询的机制
  docId,//文档中心的机制
  relativeProcessId,//主子流程的机制
};
